package Lesson;

import java.util.Scanner;

public class Test8 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        //1. 录入字符串
        System.out.println("请输入对称字符串：");
        String num = sc.nextLine();
        StringBuilder n = new StringBuilder(num);

        //2. 反转字符串
        String mun = n.reverse().toString();

        //3.判断字符串是否为对称
        if(num.equals(mun)){
            System.out.println(num + "是对称字符串。");
        }else{
            System.out.println(num + "不是对称字符串。");
        }
    }
}
